package cm.match.rule.expression;

import cm.match.dto.RuleDto;
import cm.match.rule.BaseRule;

/**
 * @author zhengsh
 * @date 2021-04-22
 */
public class OrExpression implements Expression {

    private Expression left;
    private Expression right;

    public OrExpression(Expression left, Expression right) {
        this.left = left;
        this.right = right;
    }

    @Override
    public boolean execute(RuleDto dto) {
        return left.execute(dto) || right.execute(dto);
    }
}
